package com.duing.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;

@Data
public class Book implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    @NotBlank(message = "书名不能为空")
    private String name;
    private String author;
    @Column(name = "author_id")
    private Long authorId;
    private String description;
    private Integer count;
    private Integer status;
    private String type;
}
